package com.ivanceras.server;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.IdentityType;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Choice{
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long choiceID;

    @Persistent
	private String text;
    
    @Persistent
    private Question question;
    
	@Persistent
	public boolean isCorrect = false;
	
	public Choice(){
		
	}
	
	public Choice(String text,boolean isCorrect){
		this();
		this.text = text;
		this.isCorrect = isCorrect;
	}
	public String getText(){
		return text;
	}
	public void setText(String text){
		this.text = text;
	}
	public void setIsCorrect(boolean isCorrect){
		this.isCorrect = isCorrect;
	}
	public void setQuestion(Question question){
		this.question = question;
	}
}
